/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package generadorva;

/**
 *
 * @author USUARIO
 */
public class Uniforme {

    private double a,b,p;

    public Uniforme(double a, double b) {
        this.a = a;
        this.b = b;
        this.p = 1/(Math.abs(b-a));
    }

    public double generate(double u){
        return (b-a)*u+a;
    }

    public double getA() {
        return a;
    }

    public double getB() {
        return b;
    }

    public double getP() {
        return p;
    }

}
